package com.longjianghuasheng.logistics.business.order.contract

import android.content.Context
import android.content.Intent
import androidx.activity.result.contract.ActivityResultContract

class ResultContract : ActivityResultContract<Boolean, Intent>() {
    override fun createIntent(context: Context, input: Boolean?): Intent {
        val intent = Intent()
        intent.type = "*/*" //同时选择视频和图片

        intent.action = Intent.ACTION_GET_CONTENT

        intent.addCategory(Intent.CATEGORY_OPENABLE)
        return intent
    }

    override fun parseResult(resultCode: Int, intent: Intent?): Intent? = intent
}